package com.cloud.punish.workflow.enums;

public enum TimeStrategyEnum {
	NORMAL(1, "正常计时");

	private int timeStrategyId;
	private String timeStrategyName;

	private TimeStrategyEnum(int timeStrategyId, String timeStrategyName) {
		this.timeStrategyId = timeStrategyId;
		this.timeStrategyName = timeStrategyName;
	}

	public int getTimeStrategyId() {
		return timeStrategyId;
	}

	public String getTimeStrategyName() {
		return timeStrategyName;
	}

	public static TimeStrategyEnum getStrategy(int id) {
		for (TimeStrategyEnum strategy : TimeStrategyEnum.values()) {
			if (strategy.getTimeStrategyId() == id) {
				return strategy;
			}
		}
		return null;
	}

}
